<!DOCTYPE html>
<table id="user-table" lay-filter="test"></table>
<script type="text/javascript">
	var option={
		elem:'#user-table',
		title:'管理员列表',
	    path:'user',
		addurl:'edit',
		cols:[
			[
    			{field:'id',sort:true,title:'ID'},
        		{field:'username',title:'用户名'},
        		{field:'name',title:'真实姓名'},
        		{field:'roleNames',title:'角色'}
			]
		]
	};
	var $=layui.$;
	$(function(){
		var userTable=new LayUiTable(option);
		userTable.init();
	});
 
</script>
